#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>


void reverse(char arr[], int left, int right)
{
	while (left < right)
	{
		char tmp = arr[left];
		arr[left] = arr[right];
		arr[right] = tmp;
		left++;
		right--;
	}
}


int judge(char arr[], char str[], int len)
{
	for (int i = 0; i < len; i++)
	{
		reverse(arr, 0, 0);
		reverse(arr, 1, len - 1);
		reverse(arr, 0, len - 1);
		if (strcmp(arr, str) == 0)
			return 1;
	}
	return -1;
}


int main()
{
	char arr[] = "ABCDE", str[] = "CDEAB";
	int len = strlen(arr);
	int ret = judge(arr, str, len);
	if (ret == 1)
		printf("yes\n");
	else
		printf("no\n");
	return 0;
}
